package top.zackyoung.bbs.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import top.zackyoung.bbs.entity.User;

@Mapper
@Repository
public interface UserMapper {
    User queryUser(String username);
    int updateAvatar(@Param("avatarName") String avatarName, @Param("id") Integer id);
    int updatePassword(@Param("password") String password, @Param("id") Integer id);
    int queryNikeName(@Param("nickname") String nickname);
    int updateNikeName(@Param("nickname") String nickname, @Param("id") Integer id);
    int updateAllowUserDynamic(@Param("allowUserDynamic") String allowUserDynamic, @Param("id") Integer id);
    int addUser(User user);
}